package com.qf.controller;

import com.qf.model.OrderVO;
import com.qf.service.OrderVOService;
import com.qf.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 天--道--酬--勤
 *
 * @author LiangGaoQiang
 * @ClassName OrderVOController
 * @Date: 2025/4/8 15:21
 * @Description: 描述
 */

@RestController
public class OrderVOController {
    @Autowired
    private OrderVOService orderVOService;

    @GetMapping("/one2one")
    public R getOrderwithUserByOid(int oid){
        OrderVO orderVO = orderVOService.getOrderwithUserByOid(oid);
        if (ObjectUtils.isEmpty(orderVO)) {
            return R.fail();
        }
        return R.ok(orderVO);
    }
}
